﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commerce.Base.Ubl.DataType
{
    /// <summary>
    /// A character string (i.e. a finite set of characters) generally in the form of words of a language.
    /// </summary>
    public class Text
    {
        private System.String value;
        private System.String languageId;

        /// <summary>
        /// The text value.
        /// </summary>
        public System.String Value
        {
            get { return this.value; }
            set { this.value = value; }
        }

        /// <summary>
        /// The identifier of the language used in the content component.
        /// </summary>
        public System.String LanguageId
        {
            get { return languageId; }
            set { languageId = value; }
        }

        public Text(System.String value)
        {
            this.value = value;
        }

        public override string ToString()
        {
            return this.value;
        }

        public static implicit operator Text(System.String value)
        {
            return new Text(value);
        }

        public static implicit operator System.String(Text text)
        {
            return text.value;
        }
    }
}
